home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 1997 July / Freeware CD.iso / Compuser / SOFTWARE / CS302 / CFOS.LIB / CFOSINST.RUL < prev    next >
Encoding:
Text File  |  1996-10-29  |  60.9 KB  |  2,080 lines

  1. declare
  2.  
  3. // definition of constants
  4.  
  5. #define COMPANY_NAME "Lⁿders/Winkler Gbr"
  6. #define PRODUCT_NAME "cFos fⁿr CompuServe"
  7. #define PRODUCT_VERSION "1.0"
  8. #define PRODUCT_KEY "cFos"
  9. #define DEINSTALL_KEY "cFos_Uninstall"
  10. #define UNINSTALL_NAME "cFos fⁿr CompuServe"
  11.  
  12. STRING     
  13.     // General Strings
  14.     sgRegistryValue,
  15.     sgCfosPortNumber,
  16.     sgGlobalBinaryString,
  17.  
  18.     // Registry Strings
  19.     szKey,
  20.     szClass,
  21.     szKeyRoot,
  22.     szName,
  23.     szValue,
  24.     svNumValue,
  25.  
  26.     // 4 strings to hold the free modems
  27.     szModemNumber0,
  28.     szModemNumber1,
  29.     szModemNumber2,
  30.     szModemNumber3,
  31.     sgUninstallLogFile,
  32.     sgTemp,
  33.     sgRun,
  34.     sgTemp2,
  35.     sgCapiPath,
  36.     sgCfosPath,
  37.     sgSelectedComPort;
  38.     
  39. LONG
  40.         lgResult;           // Used as temp storage for numeric returns
  41.  
  42. NUMBER 
  43.         nCapiVersion,
  44.         nSelectedComPort,    // Kai: for CFOS installation
  45.         ngCfosPortNumber,
  46.         nTemp,
  47.         nPosA,
  48.         nPosB,
  49.         nResult;
  50.  
  51. BOOL
  52.     bgKeyExists;
  53.  
  54.  
  55. // Function declarations.
  56. prototype RegistryEntry(STRING, STRING, STRING, NUMBER);
  57. prototype GetRegistryEntry(STRING, STRING, STRING, NUMBER);
  58. prototype ConvertStringToHex(STRING);
  59.  
  60.  
  61. program
  62.  
  63. Start:
  64. Enable(STATUS);
  65. SetStatusWindow(0, "Installieren von cFos...");
  66.  
  67. //////////////////////////////////////////////////////////////////////////////
  68. // Set up Uninstallation
  69. //////////////////////////////////////////////////////////////////////////////
  70. SetUpUninstallation:
  71. InstallationInfo(COMPANY_NAME, PRODUCT_NAME, PRODUCT_VERSION, PRODUCT_KEY );
  72.  
  73.     
  74. //////////////////////////////////////////////////////////////////////////////
  75. // Get Information from System.ini
  76. //////////////////////////////////////////////////////////////////////////////
  77. GetProfString(WINDIR+"SYSTEM.INI", "cFos", "ComPort", sgSelectedComPort);
  78. GetProfString(WINDIR+"SYSTEM.INI", "cFos", "CapiPath", sgCapiPath);
  79. GetProfString(WINDIR+"SYSTEM.INI", "cFos", "cFosPath", sgCfosPath);
  80. GetProfInt(WINDIR+"SYSTEM.INI", "cFos", "CapiVersion", nCapiVersion);
  81. //SprintfBox (INFORMATION, "Title", "Capi Version: %d", nCapiVersion);
  82.  
  83. //////////////////////////////////////////////////////////////////////////////
  84. // From here, log everything to make it uninstallable
  85. //////////////////////////////////////////////////////////////////////////////
  86. DeinstallStart(sgCfosPath, sgUninstallLogFile, DEINSTALL_KEY, 0);
  87. RegDBSetItem(REGDB_UNINSTALL_NAME, UNINSTALL_NAME);
  88.  
  89. //////////////////////////////////////////////////////////////////////////////
  90. // Copy cFos files
  91. //////////////////////////////////////////////////////////////////////////////
  92. CopyFiles:
  93.     TARGETDIR = sgCfosPath;
  94.     nResult = CompressGet("cfos.lib","*.*",COMP_NORMAL);
  95.     switch (nResult)
  96.         case 0:
  97.         case COMP_ERR_CREATEDIR:
  98.             MessageBox("Fehler beim Enpacken der Dateien: Zielverzeichnis konnte nicht erstellt werden.", INFORMATION);
  99.         case COMP_ERR_FILENOTINLIB:     
  100.             MessageBox("Fehler beim Enpacken der Dateien: Die gepackte Datei ist beschΣdigt.", INFORMATION);
  101.         case COMP_ERR_INCOMPATIBLE:
  102.             MessageBox("Fehler beim Enpacken der Dateien: Die gepackte Datei ist beschΣdigt.", INFORMATION);
  103.         case COMP_ERR_MEMORY:
  104.             MessageBox("Fehler beim Enpacken der Dateien: Nicht genⁿgend freier Speicher.", INFORMATION);
  105.         case COMP_ERR_NODISKSPACE:
  106.             MessageBox("Fehler beim Enpacken der Dateien: Nicht genⁿgend Platz auf dem ZieldatentrΣger.", INFORMATION);
  107.         case COMP_ERR_OPENINPUT:
  108.             MessageBox("Fehler beim Enpacken der Dateien: Gepackte Datei konnte nicht gefunden werden.", INFORMATION);
  109.         case COMP_ERR_OPENOUTPUT:
  110.             MessageBox("Fehler beim Enpacken der Dateien: Zieldateien konnten nicht erstellt werden.", INFORMATION);
  111.         case COMP_ERR_TARGETREADONLY:
  112.             MessageBox("Fehler beim Enpacken der Dateien: Mindestens eine Zieldatei ist schreibgeschⁿtzt.", INFORMATION);
  113.         default:
  114.     endswitch;
  115.  
  116. //////////////////////////////////////////////////////////////////////////////
  117. // Make the necessary changes to the Registry
  118. //////////////////////////////////////////////////////////////////////////////
  119. ChangeRegistry:
  120.  
  121. // Check, if "System\\CurrentControlSet\\Services\\Class\\Ports\\cFosX" exists.
  122. // If so, increase port number and check again, until free port found. ("...cFos1" -> "...cFos2")
  123. RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
  124. szKeyRoot = "System\\CurrentControlSet\\Services\\Class\\Ports\\cFos";
  125. bgKeyExists = FALSE;
  126. nTemp = 0;
  127.  
  128. repeat
  129.     nTemp = nTemp + 1;
  130.     NumToStr(sgTemp, nTemp);
  131.     szKey = szKeyRoot + sgTemp;
  132.     if (RegDBKeyExist (szKey) >= 0) then
  133.         bgKeyExists=TRUE;
  134.     else
  135.         bgKeyExists=FALSE;
  136.     endif;
  137. until (!bgKeyExists);
  138.  
  139. ngCfosPortNumber=nTemp;
  140.  
  141. NumToStr(sgCfosPortNumber, nTemp);
  142.  
  143. // Now we need to determine four free modems. 
  144. // Sorry, but InstallShield does not support arrays, so I have to do this
  145. // using "spagetti code". I would have preferred a single loop.
  146.  
  147. SetStatusWindow(10, "Installieren von cFos...");
  148.  
  149. szKeyRoot = "System\\CurrentControlSet\\Services\\Class\\Modem\\";
  150. bgKeyExists = FALSE;
  151. nTemp = -1;
  152.  
  153. repeat
  154.     nTemp = nTemp + 1;
  155.     NumToStr(szModemNumber0, nTemp);
  156.     sgTemp = "000" + szModemNumber0;
  157.     nResult=StrLength(sgTemp);
  158.     StrSub(szModemNumber0, sgTemp, nResult - 4, 4);
  159.     szKey = szKeyRoot + szModemNumber0;
  160.     if (RegDBKeyExist (szKey) >= 0) then
  161.         bgKeyExists=TRUE;
  162.     else
  163.         bgKeyExists=FALSE;
  164.     endif;
  165. until (!bgKeyExists);
  166. repeat
  167.     nTemp = nTemp + 1;
  168.     NumToStr(szModemNumber1, nTemp);
  169.     sgTemp = "000" + szModemNumber1;
  170.     nResult=StrLength(sgTemp);
  171.     StrSub(szModemNumber1, sgTemp, nResult - 4, 4);
  172.     szKey = szKeyRoot + szModemNumber1;
  173.     if (RegDBKeyExist (szKey) >= 0) then
  174.         bgKeyExists=TRUE;
  175.     else
  176.         bgKeyExists=FALSE;
  177.     endif;
  178. until (!bgKeyExists);
  179. repeat
  180.     nTemp = nTemp + 1;
  181.     NumToStr(szModemNumber2, nTemp);
  182.     sgTemp = "000" + szModemNumber2;
  183.     nResult=StrLength(sgTemp);
  184.     StrSub(szModemNumber2, sgTemp, nResult - 4, 4);
  185.     szKey = szKeyRoot + szModemNumber2;
  186.     if (RegDBKeyExist (szKey) >= 0) then
  187.         bgKeyExists=TRUE;
  188.             else
  189.         bgKeyExists=FALSE;
  190.     endif;
  191. until (!bgKeyExists);
  192. repeat
  193.     nTemp = nTemp + 1;
  194.     NumToStr(szModemNumber3, nTemp);
  195.     sgTemp = "000" + szModemNumber3;
  196.     nResult=StrLength(sgTemp);
  197.     StrSub(szModemNumber3, sgTemp, nResult - 4, 4);
  198.     szKey = szKeyRoot + szModemNumber3;
  199.     if (RegDBKeyExist (szKey) >= 0) then
  200.         bgKeyExists=TRUE;
  201.     else
  202.         bgKeyExists=FALSE;
  203.     endif;
  204. until (!bgKeyExists);
  205.  
  206. // Cfos# is created under System\\CurrentControlSet\\Services\\Class\\Ports
  207. // and filled with values.
  208. NumToStr(sgTemp, ngCfosPortNumber);
  209. szKey = "System\\CurrentControlSet\\Services\\Class\\Ports\\cFos" + sgTemp;
  210. szClass   = "";
  211. szKeyRoot = "System\\CurrentControlSet\\Services\\Class\\Ports";
  212.  
  213. szName = "DevLoader";
  214. szValue = "*vcomm";
  215. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  216.  
  217. szName = "Enumerator";
  218. szValue = "serenum.vxd";
  219. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  220.  
  221. szName = "PortDriver";
  222. szValue = "vcfos.vxd";
  223. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  224.  
  225. szName = "Contention";
  226. szValue = "*vcd";
  227. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  228.  
  229. szName = "ConfigDialog";
  230. szValue = "serialui.dll";
  231. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  232.  
  233. szName = "DCB";
  234. szValue = "1c,00,00,00,80,25,00,00,11,33,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00";
  235. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  236.  
  237. szName = "PortSubClass";
  238. szValue = "01";
  239. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  240.  
  241. szName = "EnumPropPages";
  242. szValue = "serialui.dll,EnumPropPages";
  243. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  244.  
  245. szName = "DriverDesc";
  246. szValue = "cFos Port";
  247. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  248.  
  249. // Cfos# is created under Enum\\Root\\Ports\\cFos#
  250. // and filled with values, where # represents the correct
  251. // cFos port number.
  252.  
  253. szKey = "Enum\\Root\\Ports\\cFos";
  254. szKey = szKey + sgCfosPortNumber;
  255.  
  256. szName = "Class";
  257. szValue = "ports";
  258. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  259.  
  260. szName = "ConfigFlags";
  261. szValue = "00,00,00,00";
  262. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  263.  
  264. szName = "DeviceDesc";
  265. szValue = "cFos Port " + sgCfosPortNumber;
  266. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  267.  
  268. SetStatusWindow(20, "Installieren von cFos...");
  269.  
  270. szName = "Driver";
  271. szValue = "ports\\cFos" + sgCfosPortNumber;
  272. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  273.  
  274. szName = "estart";
  275. szValue = "00";
  276. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  277.  
  278. szName = "FriendlyName";
  279. szValue = "cFos Port " + sgCfosPortNumber;
  280. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  281.  
  282. szName = "HardwareID";
  283. szValue = "ISDNMDM";
  284. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  285.  
  286. szName = "Mfg";
  287. szValue = "cFos Lueders Winkler Bonn";
  288. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  289.  
  290. szName = "NoSetupUI";
  291. szValue = "1";
  292. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  293.  
  294. szName = "PortName";
  295. szValue = sgSelectedComPort;
  296. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  297.  
  298. szName = "Settings";
  299. szValue = "02,10,00,80";
  300. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  301.  
  302. // Enter all the virtual modems. Just about 2000 lines of code.
  303.  
  304. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "";
  305. szName = "FriendlyDriver";
  306. szValue = "unimodem.vxd";
  307. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  308.  
  309. szName = "DevLoader";
  310. szValue = "*vcomm";
  311. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  312.  
  313. szName = "PortSubClass";
  314. szValue = "02";
  315. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  316.  
  317. szName = "PortDriver";
  318. szValue = "vcfos.vxd";
  319. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  320.  
  321. szName = "ConfigDialog";
  322. szValue = "modemui.dll";
  323. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  324.  
  325. szName = "EnumPropPages";
  326. szValue = "modemui.dll,EnumPropPages";
  327. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  328.  
  329. szName = "DeviceType";
  330. szValue = "01";
  331. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  332.  
  333. szName = "Properties";
  334. szValue = "00,00,00,00,ff,00,00,00,ff,00,00,00,07,00,00,00,0f,00,00,00,97,03,00,00,00,b8,0b,00,00,e8,03,00";
  335. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  336.  
  337. szName = "Logging";
  338. szValue = "01";
  339. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  340.  
  341. szName = "LoggingPath";
  342. szValue = "modemlog.txt";
  343. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  344.  
  345. szName = "InactivityFormat";
  346. szValue = "seconds";
  347. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  348.  
  349. szName = "InactivityScale";
  350. szValue = "0a,00,00,00";
  351. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  352.  
  353. szName = "Reset";
  354. szValue = "ATZ<cr>";
  355. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  356.  
  357. szName = "FClass";
  358. szValue = "1f,00,00,00";
  359. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  360.  
  361. szName = "InfPath";
  362. szValue = "MDMCFOS.INF";
  363. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  364.  
  365. szName = "InfSection";
  366. szValue = "Modem1";
  367. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  368.  
  369. szName = "DriverDesc";
  370. szValue = "cFos.Win,  ISDN driver (X.75, default settings)";
  371. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  372.  
  373. szName = "AttachedTo";
  374. szValue = sgSelectedComPort;
  375. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  376.  
  377. szName = "Manufacturer";
  378. szValue = "cFos Lueders Winkler GbR";
  379. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  380.  
  381. szName = "Model";
  382. szValue = "cFos.Win,  ISDN driver (X.75, default settings)";
  383. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  384.  
  385. szName = "ID";
  386. szValue = "18,7c,03,00";
  387. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  388.  
  389. SetStatusWindow(30, "Installieren von cFos...");
  390.  
  391. szName = "Default";
  392. szValue = "3c,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,93,01,00,00";
  393. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  394.  
  395. szName = "DCB";
  396. szValue = "1c,00,00,00,00,b8,0b,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,50,7e";
  397. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  398.  
  399. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Init";
  400. szName = "1";
  401. szValue = "AT<cr>";
  402. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  403.  
  404. szName = "2";
  405. szValue = "AT &F S9=130<cr>";
  406. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  407.  
  408. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Responses";
  409. szName = "<cr><lf>OK<cr><lf>";
  410. szValue = "00,00,00,00,00,00,00,00,00,00";
  411. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  412.  
  413. szName = "<cr><lf>ERROR<cr><lf>";
  414. szValue = "03,00,00,00,00,00,00,00,00,00";
  415. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  416.  
  417. szName = "<cr>";
  418. szValue = "01,00,00,00,00,00,00,00,00,00";
  419. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  420.  
  421. szName = "<lf>";
  422. szValue = "01,00,00,00,00,00,00,00,00,00";
  423. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  424.  
  425. szName = "<cr><lf>RING<cr><lf>";
  426. szValue = "08,00,00,00,00,00,00,00,00,00";
  427. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  428.  
  429. szName = "<cr><lf>NO CARRIER<cr><lf>";
  430. szValue = "04,00,00,00,00,00,00,00,00,00";
  431. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  432.  
  433. szName = "<cr><lf>NO DIALTONE<cr><lf>";
  434. szValue = "05,00,00,00,00,00,00,00,00,00";
  435. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  436.  
  437. szName = "<cr><lf>BUSY<cr><lf>";
  438. szValue = "06,00,00,00,00,00,00,00,00,00";
  439. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  440.  
  441. szName = "<cr><lf>NO ANSWER<cr><lf>";
  442. szValue = "07,00,00,00,00,00,00,00,00,00";
  443. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  444.  
  445. szName = "<cr><lf>RINGING<cr><lf>";
  446. szValue = "01,00,00,00,00,00,00,00,00,00";
  447. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  448.  
  449. szName = "<cr><lf>CONNECT<cr><lf>";
  450. szValue = "02,00,00,00,00,00,00,00,00,00";
  451. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  452.  
  453. szName = "<cr><lf>CONNECT 64000<cr><lf>";
  454. szValue = "02,02,00,fa,00,00,00,00,00,00";
  455. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  456.  
  457. szName = "<cr><lf>CONNECT 64000/PPP<cr><lf>";
  458. szValue = "02,02,00,fa,00,00,00,00,00,00";
  459. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  460.  
  461. szName = "<cr><lf>CONNECT 64000/V42B/TX<cr><lf>";
  462. szValue = "02,03,00,fa,00,00,00,00,00,00";
  463. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  464.  
  465. szName = "<cr><lf>CONNECT 64000/V42B/RX<cr><lf>";
  466. szValue = "02,03,00,fa,00,00,00,00,00,00";
  467. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  468.  
  469. szName = "<cr><lf>CONNECT 64000/V42B/TXRX<cr><lf>";
  470. szValue = "02,03,00,fa,00,00,00,00,00,00";
  471. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  472.  
  473. szName = "<cr><lf>CONNECT 38400<cr><lf>";
  474. szValue = "02,00,00,96,00,00,00,00,00,00";
  475. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  476.  
  477. szName = "<cr><lf>CONNECT 19200<cr><lf>";
  478. szValue = "02,00,00,4b,00,00,00,00,00,00";
  479. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  480.  
  481. szName = "<cr><lf>CONNECT 9600<cr><lf>";
  482. szValue = "02,00,80,25,00,00,00,00,00,00";
  483. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  484.  
  485. szName = "<cr><lf>CONNECT 14400<cr><lf>";
  486. szValue = "02,03,40,38,00,00,00,00,00,00";
  487. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  488.  
  489. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Monitor";
  490. szName = "1";
  491. szValue = "ATS0=0<cr>";
  492. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  493.  
  494. szName = "2";
  495. szValue = "None";
  496. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  497.  
  498. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Hangup";
  499. szName = "1";
  500. szValue = "ATH0<cr>";
  501. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  502.  
  503. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Answer";
  504. szName = "1";
  505. szValue = "ATA<cr>";
  506. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  507.  
  508. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Settings";
  509. szName = "Prefix";
  510. szValue = "AT";
  511. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  512.  
  513. SetStatusWindow(40, "Installieren von cFos...");
  514.  
  515. szName = "Terminator";
  516. szValue = "<cr>";
  517. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  518.  
  519. szName = "DialPrefix";
  520. szValue = "D";
  521. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  522.  
  523. szName = "DialSuffix";
  524. szValue = "";
  525. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  526.  
  527. szName = "SpeakerVolume_Low";
  528. szValue = "L0";
  529. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  530.  
  531. szName = "SpeakerVolume_Med";
  532. szValue = "L1";
  533. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  534.  
  535. szName = "SpeakerVolume_High";
  536. szValue = "L2";
  537. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  538.  
  539. szName = "SpeakerMode_Off";
  540. szValue = "M0";
  541. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  542.  
  543. szName = "SpeakerMode_Dial";
  544. szValue = "M1";
  545. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  546.  
  547. szName = "SpeakerMode_On";
  548. szValue = "M2";
  549. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  550.  
  551. szName = "SpeakerMode_Setup";
  552. szValue = "M3";
  553. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  554.  
  555. szName = "FlowControl_Off";
  556. szValue = "";
  557. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  558.  
  559. szName = "FlowControl_Hard";
  560. szValue = "";
  561. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  562.  
  563. szName = "FlowControl_Soft";
  564. szValue = "";
  565. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  566.  
  567. szName = "ErrorControl_On";
  568. szValue = "";
  569. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  570.  
  571. szName = "ErrorControl_Off";
  572. szValue = "";
  573. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  574.  
  575. szName = "ErrorControl_Forced";
  576. szValue = "";
  577. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  578.  
  579. szName = "Compression_On";
  580. szValue = "";
  581. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  582.  
  583. szName = "Compression_Off";
  584. szValue = "";
  585. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  586.  
  587. szName = "Modulation_CCITT";
  588. szValue = "";
  589. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  590.  
  591. szName = "Modulation_Bell";
  592. szValue = "";
  593. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  594.  
  595. szName = "SpeedNegotiation_Off";
  596. szValue = "";
  597. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  598.  
  599. szName = "SpeedNegotiation_On";
  600. szValue = "";
  601. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  602.  
  603. szName = "Pulse";
  604. szValue = "P";
  605. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  606.  
  607. szName = "Tone";
  608. szValue = "T";
  609. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  610.  
  611. szName = "Blind_Off";
  612. szValue = "";
  613. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  614.  
  615. szName = "Blind_On";
  616. szValue = "";
  617. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  618.  
  619. szName = "CallSetupFailTimer";
  620. szValue = "S7=<#>";
  621. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  622.  
  623. szName = "InactivityTimeout";
  624. szValue = "S19=<#>";
  625. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  626.  
  627. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber0 + "\\Fax";
  628. szName = "Class1DTESpeed";
  629. szValue = "AUTO";
  630. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  631.  
  632. szName = "Class1FlowOff";
  633. szValue = "";
  634. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  635.  
  636. SetStatusWindow(45, "Installieren von cFos...");
  637.  
  638. szName = "Class1FlowHW";
  639. szValue = "";
  640. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  641.  
  642. szName = "Class1FlowSW";
  643. szValue = "";
  644. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  645.  
  646. szName = "Class2FlowOff";
  647. szValue = "";
  648. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  649.  
  650. szName = "Class2FlowHW";
  651. szValue = "";
  652. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  653.  
  654. szName = "Class2FlowSW";
  655. szValue = "";
  656. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  657.  
  658. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "";
  659. szName = "FriendlyDriver";
  660. szValue = "unimodem.vxd";
  661. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  662.  
  663. szName = "DevLoader";
  664. szValue = "*vcomm";
  665. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  666.  
  667. szName = "PortSubClass";
  668. szValue = "02";
  669. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  670.  
  671. szName = "PortDriver";
  672. szValue = "vcfos.vxd";
  673. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  674.  
  675. szName = "ConfigDialog";
  676. szValue = "modemui.dll";
  677. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  678.  
  679. szName = "EnumPropPages";
  680. szValue = "modemui.dll,EnumPropPages";
  681. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  682.  
  683. szName = "DeviceType";
  684. szValue = "01";
  685. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  686.  
  687. szName = "Properties";
  688. szValue = "00,00,00,00,ff,00,00,00,ff,00,00,00,07,00,00,00,0f,00,00,00,97,03,00,00,00,b8,0b,00,00,e8,03,00";
  689. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  690.  
  691. szName = "Logging";
  692. szValue = "01";
  693. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  694.  
  695. szName = "LoggingPath";
  696. szValue = "modemlog.txt";
  697. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  698.  
  699. szName = "InactivityFormat";
  700. szValue = "seconds";
  701. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  702.  
  703. szName = "InactivityScale";
  704. szValue = "0a,00,00,00";
  705. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  706.  
  707. szName = "Reset";
  708. szValue = "ATZ<cr>";
  709. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  710.  
  711. szName = "FClass";
  712. szValue = "1f,00,00,00";
  713. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  714.  
  715. szName = "InfPath";
  716. szValue = "MDMCFOS.INF";
  717. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  718.  
  719. szName = "InfSection";
  720. szValue = "Modem2";
  721. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  722.  
  723. szName = "DriverDesc";
  724. szValue = "cFos.Win,  ISDN driver (Datex-J)";
  725. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  726.  
  727. szName = "AttachedTo";
  728. szValue = sgSelectedComPort;
  729. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  730.  
  731. szName = "Manufacturer";
  732. szValue = "cFos Lueders Winkler GbR";
  733. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  734.  
  735. szName = "Model";
  736. szValue = "cFos.Win,  ISDN driver (Datex-J)";
  737. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  738.  
  739. szName = "ID";
  740. szValue = "2f,36,04,00";
  741. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  742.  
  743. szName = "Default";
  744. szValue = "3c,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,93,01,00,00";
  745. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  746.  
  747. szName = "DCB";
  748. szValue = "1c,00,00,00,00,b8,0b,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,50,7e";
  749. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  750.  
  751. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Init";
  752. szName = "1";
  753. szValue = "AT<cr>";
  754. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  755.  
  756. szName = "2";
  757. szValue = "AT &F S9=130<cr>";
  758. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  759.  
  760. SetStatusWindow(50, "Installieren von cFos...");
  761.  
  762. szName = "3";
  763. szValue = "AT B5<cr>";
  764. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  765.  
  766. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Responses";
  767. szName = "<cr><lf>OK<cr><lf>";
  768. szValue = "00,00,00,00,00,00,00,00,00,00";
  769. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  770.  
  771. szName = "<cr><lf>ERROR<cr><lf>";
  772. szValue = "03,00,00,00,00,00,00,00,00,00";
  773. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  774.  
  775. szName = "<cr>";
  776. szValue = "01,00,00,00,00,00,00,00,00,00";
  777. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  778.  
  779. szName = "<lf>";
  780. szValue = "01,00,00,00,00,00,00,00,00,00";
  781. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  782.  
  783. szName = "<cr><lf>RING<cr><lf>";
  784. szValue = "08,00,00,00,00,00,00,00,00,00";
  785. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  786.  
  787. szName = "<cr><lf>NO CARRIER<cr><lf>";
  788. szValue = "04,00,00,00,00,00,00,00,00,00";
  789. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  790.  
  791. szName = "<cr><lf>NO DIALTONE<cr><lf>";
  792. szValue = "05,00,00,00,00,00,00,00,00,00";
  793. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  794.  
  795. szName = "<cr><lf>BUSY<cr><lf>";
  796. szValue = "06,00,00,00,00,00,00,00,00,00";
  797. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  798.  
  799. szName = "<cr><lf>NO ANSWER<cr><lf>";
  800. szValue = "07,00,00,00,00,00,00,00,00,00";
  801. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  802.  
  803. szName = "<cr><lf>RINGING<cr><lf>";
  804. szValue = "01,00,00,00,00,00,00,00,00,00";
  805. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  806.  
  807. szName = "<cr><lf>CONNECT<cr><lf>";
  808. szValue = "02,00,00,00,00,00,00,00,00,00";
  809. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  810.  
  811. szName = "<cr><lf>CONNECT 64000<cr><lf>";
  812. szValue = "02,02,00,fa,00,00,00,00,00,00";
  813. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  814.  
  815. szName = "<cr><lf>CONNECT 64000/PPP<cr><lf>";
  816. szValue = "02,02,00,fa,00,00,00,00,00,00";
  817. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  818.  
  819. szName = "<cr><lf>CONNECT 64000/V42B/TX<cr><lf>";
  820. szValue = "02,03,00,fa,00,00,00,00,00,00";
  821. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  822.  
  823. szName = "<cr><lf>CONNECT 64000/V42B/RX<cr><lf>";
  824. szValue = "02,03,00,fa,00,00,00,00,00,00";
  825. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  826.  
  827. szName = "<cr><lf>CONNECT 64000/V42B/TXRX<cr><lf>";
  828. szValue = "02,03,00,fa,00,00,00,00,00,00";
  829. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  830.  
  831. szName = "<cr><lf>CONNECT 38400<cr><lf>";
  832. szValue = "02,00,00,96,00,00,00,00,00,00";
  833. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  834.  
  835. szName = "<cr><lf>CONNECT 19200<cr><lf>";
  836. szValue = "02,00,00,4b,00,00,00,00,00,00";
  837. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  838.  
  839. szName = "<cr><lf>CONNECT 9600<cr><lf>";
  840. szValue = "02,00,80,25,00,00,00,00,00,00";
  841. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  842.  
  843. szName = "<cr><lf>CONNECT 14400<cr><lf>";
  844. szValue = "02,03,40,38,00,00,00,00,00,00";
  845. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  846.  
  847. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Monitor";
  848. szName = "1";
  849. szValue = "ATS0=0<cr>";
  850. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  851.  
  852. szName = "2";
  853. szValue = "None";
  854. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  855.  
  856. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Hangup";
  857. szName = "1";
  858. szValue = "ATH0<cr>";
  859. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  860.  
  861. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Answer";
  862. szName = "1";
  863. szValue = "ATA<cr>";
  864. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  865.  
  866. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Settings";
  867. szName = "Prefix";
  868. szValue = "AT";
  869. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  870.  
  871. szName = "Terminator";
  872. szValue = "<cr>";
  873. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  874.  
  875. szName = "DialPrefix";
  876. szValue = "D";
  877. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  878.  
  879. szName = "DialSuffix";
  880. szValue = "";
  881. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  882.  
  883. SetStatusWindow(55, "Installieren von cFos...");
  884.  
  885. szName = "SpeakerVolume_Low";
  886. szValue = "L0";
  887. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  888.  
  889. szName = "SpeakerVolume_Med";
  890. szValue = "L1";
  891. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  892.  
  893. szName = "SpeakerVolume_High";
  894. szValue = "L2";
  895. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  896.  
  897. szName = "SpeakerMode_Off";
  898. szValue = "M0";
  899. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  900.  
  901. szName = "SpeakerMode_Dial";
  902. szValue = "M1";
  903. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  904.  
  905. szName = "SpeakerMode_On";
  906. szValue = "M2";
  907. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  908.  
  909. szName = "SpeakerMode_Setup";
  910. szValue = "M3";
  911. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  912.  
  913. szName = "FlowControl_Off";
  914. szValue = "";
  915. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  916.  
  917. szName = "FlowControl_Hard";
  918. szValue = "";
  919. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  920.  
  921. szName = "FlowControl_Soft";
  922. szValue = "";
  923. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  924.  
  925. szName = "ErrorControl_On";
  926. szValue = "";
  927. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  928.  
  929. szName = "ErrorControl_Off";
  930. szValue = "";
  931. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  932.  
  933. szName = "ErrorControl_Forced";
  934. szValue = "";
  935. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  936.  
  937. szName = "Compression_On";
  938. szValue = "";
  939. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  940.  
  941. szName = "Compression_Off";
  942. szValue = "";
  943. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  944.  
  945. szName = "Modulation_CCITT";
  946. szValue = "";
  947. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  948.  
  949. szName = "Modulation_Bell";
  950. szValue = "";
  951. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  952.  
  953. szName = "SpeedNegotiation_Off";
  954. szValue = "";
  955. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  956.  
  957. szName = "SpeedNegotiation_On";
  958. szValue = "";
  959. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  960.  
  961. szName = "Pulse";
  962. szValue = "P";
  963. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  964.  
  965. szName = "Tone";
  966. szValue = "T";
  967. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  968.  
  969. szName = "Blind_Off";
  970. szValue = "";
  971. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  972.  
  973. szName = "Blind_On";
  974. szValue = "";
  975. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  976.  
  977. szName = "CallSetupFailTimer";
  978. szValue = "S7=<#>";
  979. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  980.  
  981. szName = "InactivityTimeout";
  982. szValue = "S19=<#>";
  983. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  984.  
  985. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber1 + "\\Fax";
  986. szName = "Class1DTESpeed";
  987. szValue = "AUTO";
  988. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  989.  
  990. szName = "Class1FlowOff";
  991. szValue = "";
  992. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  993.  
  994. szName = "Class1FlowHW";
  995. szValue = "";
  996. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  997.  
  998. szName = "Class1FlowSW";
  999. szValue = "";
  1000. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1001.  
  1002. szName = "Class2FlowOff";
  1003. szValue = "";
  1004. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1005.  
  1006. SetStatusWindow(60, "Installieren von cFos...");
  1007.  
  1008. szName = "Class2FlowHW";
  1009. szValue = "";
  1010. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1011.  
  1012. szName = "Class2FlowSW";
  1013. szValue = "";
  1014. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1015.  
  1016. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "";
  1017. szName = "FriendlyDriver";
  1018. szValue = "unimodem.vxd";
  1019. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1020.  
  1021. szName = "DevLoader";
  1022. szValue = "*vcomm";
  1023. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1024.  
  1025. szName = "PortSubClass";
  1026. szValue = "02";
  1027. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1028.  
  1029. szName = "PortDriver";
  1030. szValue = "vcfos.vxd";
  1031. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1032.  
  1033. szName = "ConfigDialog";
  1034. szValue = "modemui.dll";
  1035. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1036.  
  1037. szName = "EnumPropPages";
  1038. szValue = "modemui.dll,EnumPropPages";
  1039. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1040.  
  1041. szName = "DeviceType";
  1042. szValue = "01";
  1043. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1044.  
  1045. szName = "Properties";
  1046. szValue = "00,00,00,00,ff,00,00,00,ff,00,00,00,07,00,00,00,0f,00,00,00,97,03,00,00,00,b8,0b,00,00,e8,03,00";
  1047. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1048.  
  1049. szName = "Logging";
  1050. szValue = "01";
  1051. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1052.  
  1053. szName = "LoggingPath";
  1054. szValue = "modemlog.txt";
  1055. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1056.  
  1057. szName = "InactivityFormat";
  1058. szValue = "seconds";
  1059. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1060.  
  1061. szName = "InactivityScale";
  1062. szValue = "0a,00,00,00";
  1063. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1064.  
  1065. szName = "Reset";
  1066. szValue = "ATZ<cr>";
  1067. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1068.  
  1069. szName = "FClass";
  1070. szValue = "1f,00,00,00";
  1071. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1072.  
  1073. szName = "InfPath";
  1074. szValue = "MDMCFOS.INF";
  1075. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1076.  
  1077. szName = "InfSection";
  1078. szValue = "Modem13";
  1079. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1080.  
  1081. szName = "DriverDesc";
  1082. szValue = "cFos.Win,  ISDN driver (V.110, 38400)";
  1083. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1084.  
  1085. szName = "AttachedTo";
  1086. szValue = sgSelectedComPort;
  1087. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1088.  
  1089. szName = "Manufacturer";
  1090. szValue = "cFos Lueders Winkler GbR";
  1091. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1092.  
  1093. szName = "Model";
  1094. szValue = "cFos.Win,  ISDN driver (V.110, 38400)";
  1095. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1096.  
  1097. szName = "ID";
  1098. szValue = "6a,7f,04,00";
  1099. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1100.  
  1101. szName = "Default";
  1102. szValue = "3c,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,93,01,00,00";
  1103. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1104.  
  1105. szName = "DCB";
  1106. szValue = "1c,00,00,00,00,b8,0b,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,50,7e";
  1107. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1108.  
  1109. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Init";
  1110. szName = "1";
  1111. szValue = "AT<cr>";
  1112. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1113.  
  1114. szName = "2";
  1115. szValue = "AT &F S9=130 ATS17=0<cr>";
  1116. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1117.  
  1118. szName = "3";
  1119. szValue = "AT B1<cr>";
  1120. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1121.  
  1122. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Responses";
  1123. szName = "<cr><lf>OK<cr><lf>";
  1124. szValue = "00,00,00,00,00,00,00,00,00,00";
  1125. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1126.  
  1127. SetStatusWindow(65, "Installieren von cFos...");
  1128.  
  1129. szName = "<cr><lf>ERROR<cr><lf>";
  1130. szValue = "03,00,00,00,00,00,00,00,00,00";
  1131. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1132.  
  1133. szName = "<cr>";
  1134. szValue = "01,00,00,00,00,00,00,00,00,00";
  1135. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1136.  
  1137. szName = "<lf>";
  1138. szValue = "01,00,00,00,00,00,00,00,00,00";
  1139. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1140.  
  1141. szName = "<cr><lf>RING<cr><lf>";
  1142. szValue = "08,00,00,00,00,00,00,00,00,00";
  1143. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1144.  
  1145. szName = "<cr><lf>NO CARRIER<cr><lf>";
  1146. szValue = "04,00,00,00,00,00,00,00,00,00";
  1147. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1148.  
  1149. szName = "<cr><lf>NO DIALTONE<cr><lf>";
  1150. szValue = "05,00,00,00,00,00,00,00,00,00";
  1151. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1152.  
  1153. szName = "<cr><lf>BUSY<cr><lf>";
  1154. szValue = "06,00,00,00,00,00,00,00,00,00";
  1155. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1156.  
  1157. szName = "<cr><lf>NO ANSWER<cr><lf>";
  1158. szValue = "07,00,00,00,00,00,00,00,00,00";
  1159. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1160.  
  1161. szName = "<cr><lf>RINGING<cr><lf>";
  1162. szValue = "01,00,00,00,00,00,00,00,00,00";
  1163. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1164.  
  1165. szName = "<cr><lf>CONNECT<cr><lf>";
  1166. szValue = "02,00,00,00,00,00,00,00,00,00";
  1167. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1168.  
  1169. szName = "<cr><lf>CONNECT 64000<cr><lf>";
  1170. szValue = "02,02,00,fa,00,00,00,00,00,00";
  1171. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1172.  
  1173. szName = "<cr><lf>CONNECT 64000/PPP<cr><lf>";
  1174. szValue = "02,02,00,fa,00,00,00,00,00,00";
  1175. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1176.  
  1177. szName = "<cr><lf>CONNECT 64000/V42B/TX<cr><lf>";
  1178. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1179. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1180.  
  1181. szName = "<cr><lf>CONNECT 64000/V42B/RX<cr><lf>";
  1182. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1183. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1184.  
  1185. szName = "<cr><lf>CONNECT 64000/V42B/TXRX<cr><lf>";
  1186. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1187. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1188.  
  1189. szName = "<cr><lf>CONNECT 38400<cr><lf>";
  1190. szValue = "02,00,00,96,00,00,00,00,00,00";
  1191. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1192.  
  1193. szName = "<cr><lf>CONNECT 19200<cr><lf>";
  1194. szValue = "02,00,00,4b,00,00,00,00,00,00";
  1195. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1196.  
  1197. szName = "<cr><lf>CONNECT 9600<cr><lf>";
  1198. szValue = "02,00,80,25,00,00,00,00,00,00";
  1199. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1200.  
  1201. szName = "<cr><lf>CONNECT 14400<cr><lf>";
  1202. szValue = "02,03,40,38,00,00,00,00,00,00";
  1203. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1204.  
  1205. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Monitor";
  1206. szName = "1";
  1207. szValue = "ATS0=0<cr>";
  1208. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1209.  
  1210. szName = "2";
  1211. szValue = "None";
  1212. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1213.  
  1214. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Hangup";
  1215. szName = "1";
  1216. szValue = "ATH0<cr>";
  1217. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1218.  
  1219. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Answer";
  1220. szName = "1";
  1221. szValue = "ATA<cr>";
  1222. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1223.  
  1224. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Settings";
  1225. szName = "Prefix";
  1226. szValue = "AT";
  1227. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1228.  
  1229. szName = "Terminator";
  1230. szValue = "<cr>";
  1231. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1232.  
  1233. szName = "DialPrefix";
  1234. szValue = "D";
  1235. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1236.  
  1237. szName = "DialSuffix";
  1238. szValue = "";
  1239. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1240.  
  1241. szName = "SpeakerVolume_Low";
  1242. szValue = "L0";
  1243. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1244.  
  1245. szName = "SpeakerVolume_Med";
  1246. szValue = "L1";
  1247. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1248.  
  1249. SetStatusWindow(70, "Installieren von cFos...");
  1250.  
  1251. szName = "SpeakerVolume_High";
  1252. szValue = "L2";
  1253. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1254.  
  1255. szName = "SpeakerMode_Off";
  1256. szValue = "M0";
  1257. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1258.  
  1259. szName = "SpeakerMode_Dial";
  1260. szValue = "M1";
  1261. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1262.  
  1263. szName = "SpeakerMode_On";
  1264. szValue = "M2";
  1265. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1266.  
  1267. szName = "SpeakerMode_Setup";
  1268. szValue = "M3";
  1269. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1270.  
  1271. szName = "FlowControl_Off";
  1272. szValue = "";
  1273. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1274.  
  1275. szName = "FlowControl_Hard";
  1276. szValue = "";
  1277. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1278.  
  1279. szName = "FlowControl_Soft";
  1280. szValue = "";
  1281. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1282.  
  1283. szName = "ErrorControl_On";
  1284. szValue = "";
  1285. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1286.  
  1287. szName = "ErrorControl_Off";
  1288. szValue = "";
  1289. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1290.  
  1291. szName = "ErrorControl_Forced";
  1292. szValue = "";
  1293. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1294.  
  1295. szName = "Compression_On";
  1296. szValue = "";
  1297. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1298.  
  1299. szName = "Compression_Off";
  1300. szValue = "";
  1301. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1302.  
  1303. szName = "Modulation_CCITT";
  1304. szValue = "";
  1305. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1306.  
  1307. szName = "Modulation_Bell";
  1308. szValue = "";
  1309. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1310.  
  1311. szName = "SpeedNegotiation_Off";
  1312. szValue = "";
  1313. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1314.  
  1315. szName = "SpeedNegotiation_On";
  1316. szValue = "";
  1317. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1318.  
  1319. szName = "Pulse";
  1320. szValue = "P";
  1321. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1322.  
  1323. szName = "Tone";
  1324. szValue = "T";
  1325. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1326.  
  1327. szName = "Blind_Off";
  1328. szValue = "";
  1329. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1330.  
  1331. szName = "Blind_On";
  1332. szValue = "";
  1333. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1334.  
  1335. szName = "CallSetupFailTimer";
  1336. szValue = "S7=<#>";
  1337. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1338.  
  1339. szName = "InactivityTimeout";
  1340. szValue = "S19=<#>";
  1341. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1342.  
  1343. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber2 + "\\Fax";
  1344. szName = "Class1DTESpeed";
  1345. szValue = "AUTO";
  1346. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1347.  
  1348. szName = "Class1FlowOff";
  1349. szValue = "";
  1350. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1351.  
  1352. szName = "Class1FlowHW";
  1353. szValue = "";
  1354. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1355.  
  1356. szName = "Class1FlowSW";
  1357. szValue = "";
  1358. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1359.  
  1360. szName = "Class2FlowOff";
  1361. szValue = "";
  1362. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1363.  
  1364. szName = "Class2FlowHW";
  1365. szValue = "";
  1366. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1367.  
  1368. szName = "Class2FlowSW";
  1369. szValue = "";
  1370. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378. SetStatusWindow(75, "Installieren von cFos...");
  1379.  
  1380. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "";
  1381. szName = "FriendlyDriver";
  1382. szValue = "unimodem.vxd";
  1383. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1384.  
  1385. szName = "DevLoader";
  1386. szValue = "*vcomm";
  1387. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1388.  
  1389. szName = "PortSubClass";
  1390. szValue = "02";
  1391. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1392.  
  1393. szName = "PortDriver";
  1394. szValue = "vcfos.vxd";
  1395. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1396.  
  1397. szName = "ConfigDialog";
  1398. szValue = "modemui.dll";
  1399. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1400.  
  1401. szName = "EnumPropPages";
  1402. szValue = "modemui.dll,EnumPropPages";
  1403. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1404.  
  1405. szName = "DeviceType";
  1406. szValue = "01";
  1407. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1408.  
  1409. szName = "Properties";
  1410. szValue = "00,00,00,00,ff,00,00,00,ff,00,00,00,07,00,00,00,0f,00,00,00,97,03,00,00,00,b8,0b,00,00,e8,03,00";
  1411. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1412.  
  1413. szName = "Logging";
  1414. szValue = "01";
  1415. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1416.  
  1417. szName = "LoggingPath";
  1418. szValue = "modemlog.txt";
  1419. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1420.  
  1421. szName = "InactivityFormat";
  1422. szValue = "seconds";
  1423. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1424.  
  1425. szName = "InactivityScale";
  1426. szValue = "0a,00,00,00";
  1427. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1428.  
  1429. szName = "Reset";
  1430. szValue = "ATZ<cr>";
  1431. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1432.  
  1433. szName = "FClass";
  1434. szValue = "1f,00,00,00";
  1435. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1436.  
  1437. szName = "InfPath";
  1438. szValue = "MDMCFOS.INF";
  1439. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1440.  
  1441. szName = "InfSection";
  1442. szValue = "Modem15";
  1443. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1444.  
  1445. szName = "DriverDesc";
  1446. szValue = "cFos.Win,  ISDN driver (V.120)";
  1447. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1448.  
  1449. szName = "AttachedTo";
  1450. szValue = sgSelectedComPort;
  1451. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1452.  
  1453. szName = "Manufacturer";
  1454. szValue = "cFos Lueders Winkler GbR";
  1455. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1456.  
  1457. szName = "Model";
  1458. szValue = "cFos.Win,  ISDN driver (V.120)";
  1459. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1460.  
  1461. szName = "ID";
  1462. szValue = "73,84,06,00";
  1463. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1464.  
  1465. szName = "Default";
  1466. szValue = "3c,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,93,01,00,00";
  1467. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1468.  
  1469. szName = "DCB";
  1470. szValue = "1c,00,00,00,00,b8,0b,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,50,7e";
  1471. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1472.  
  1473. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Init";
  1474. szName = "1";
  1475. szValue = "AT<cr>";
  1476. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1477.  
  1478. szName = "2";
  1479. szValue = "AT &F S9=130 ATS17=0<cr>";
  1480. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1481.  
  1482. szName = "3";
  1483. szValue = "AT B12<cr>";
  1484. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1485.  
  1486. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Responses";
  1487. szName = "<cr><lf>OK<cr><lf>";
  1488. szValue = "00,00,00,00,00,00,00,00,00,00";
  1489. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1490.  
  1491. szName = "<cr><lf>ERROR<cr><lf>";
  1492. szValue = "03,00,00,00,00,00,00,00,00,00";
  1493. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1494.  
  1495. szName = "<cr>";
  1496. szValue = "01,00,00,00,00,00,00,00,00,00";
  1497. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1498.  
  1499. SetStatusWindow(80, "Installieren von cFos...");
  1500.  
  1501. szName = "<lf>";
  1502. szValue = "01,00,00,00,00,00,00,00,00,00";
  1503. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1504.  
  1505. szName = "<cr><lf>RING<cr><lf>";
  1506. szValue = "08,00,00,00,00,00,00,00,00,00";
  1507. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1508.  
  1509. szName = "<cr><lf>NO CARRIER<cr><lf>";
  1510. szValue = "04,00,00,00,00,00,00,00,00,00";
  1511. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1512.  
  1513. szName = "<cr><lf>NO DIALTONE<cr><lf>";
  1514. szValue = "05,00,00,00,00,00,00,00,00,00";
  1515. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1516.  
  1517. szName = "<cr><lf>BUSY<cr><lf>";
  1518. szValue = "06,00,00,00,00,00,00,00,00,00";
  1519. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1520.  
  1521. szName = "<cr><lf>NO ANSWER<cr><lf>";
  1522. szValue = "07,00,00,00,00,00,00,00,00,00";
  1523. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1524.  
  1525. szName = "<cr><lf>RINGING<cr><lf>";
  1526. szValue = "01,00,00,00,00,00,00,00,00,00";
  1527. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1528.  
  1529. szName = "<cr><lf>CONNECT<cr><lf>";
  1530. szValue = "02,00,00,00,00,00,00,00,00,00";
  1531. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1532.  
  1533. szName = "<cr><lf>CONNECT 64000<cr><lf>";
  1534. szValue = "02,02,00,fa,00,00,00,00,00,00";
  1535. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1536.  
  1537. szName = "<cr><lf>CONNECT 64000/PPP<cr><lf>";
  1538. szValue = "02,02,00,fa,00,00,00,00,00,00";
  1539. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1540.  
  1541. szName = "<cr><lf>CONNECT 64000/V42B/TX<cr><lf>";
  1542. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1543. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1544.  
  1545. szName = "<cr><lf>CONNECT 64000/V42B/RX<cr><lf>";
  1546. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1547. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1548.  
  1549. szName = "<cr><lf>CONNECT 64000/V42B/TXRX<cr><lf>";
  1550. szValue = "02,03,00,fa,00,00,00,00,00,00";
  1551. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1552.  
  1553. szName = "<cr><lf>CONNECT 38400<cr><lf>";
  1554. szValue = "02,00,00,96,00,00,00,00,00,00";
  1555. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1556.  
  1557. szName = "<cr><lf>CONNECT 19200<cr><lf>";
  1558. szValue = "02,00,00,4b,00,00,00,00,00,00";
  1559. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1560.  
  1561. szName = "<cr><lf>CONNECT 9600<cr><lf>";
  1562. szValue = "02,00,80,25,00,00,00,00,00,00";
  1563. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1564.  
  1565. szName = "<cr><lf>CONNECT 14400<cr><lf>";
  1566. szValue = "02,03,40,38,00,00,00,00,00,00";
  1567. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1568.  
  1569. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Monitor";
  1570. szName = "1";
  1571. szValue = "ATS0=0<cr>";
  1572. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1573.  
  1574. szName = "2";
  1575. szValue = "None";
  1576. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1577.  
  1578. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Hangup";
  1579. szName = "1";
  1580. szValue = "ATH0<cr>";
  1581. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1582.  
  1583. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Answer";
  1584. szName = "1";
  1585. szValue = "ATA<cr>";
  1586. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1587.  
  1588. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Settings";
  1589. szName = "Prefix";
  1590. szValue = "AT";
  1591. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1592.  
  1593. szName = "Terminator";
  1594. szValue = "<cr>";
  1595. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1596.  
  1597. szName = "DialPrefix";
  1598. szValue = "D";
  1599. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1600.  
  1601. szName = "DialSuffix";
  1602. szValue = "";
  1603. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1604.  
  1605. szName = "SpeakerVolume_Low";
  1606. szValue = "L0";
  1607. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1608.  
  1609. szName = "SpeakerVolume_Med";
  1610. szValue = "L1";
  1611. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1612.  
  1613. szName = "SpeakerVolume_High";
  1614. szValue = "L2";
  1615. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1616.  
  1617. szName = "SpeakerMode_Off";
  1618. szValue = "M0";
  1619. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1620.  
  1621. SetStatusWindow(85, "Installieren von cFos...");
  1622.  
  1623. szName = "SpeakerMode_Dial";
  1624. szValue = "M1";
  1625. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1626.  
  1627. szName = "SpeakerMode_On";
  1628. szValue = "M2";
  1629. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1630.  
  1631. szName = "SpeakerMode_Setup";
  1632. szValue = "M3";
  1633. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1634.  
  1635. szName = "FlowControl_Off";
  1636. szValue = "";
  1637. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1638.  
  1639. szName = "FlowControl_Hard";
  1640. szValue = "";
  1641. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1642.  
  1643. szName = "FlowControl_Soft";
  1644. szValue = "";
  1645. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1646.  
  1647. szName = "ErrorControl_On";
  1648. szValue = "";
  1649. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1650.  
  1651. szName = "ErrorControl_Off";
  1652. szValue = "";
  1653. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1654.  
  1655. szName = "ErrorControl_Forced";
  1656. szValue = "";
  1657. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1658.  
  1659. szName = "Compression_On";
  1660. szValue = "";
  1661. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1662.  
  1663. szName = "Compression_Off";
  1664. szValue = "";
  1665. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1666.  
  1667. szName = "Modulation_CCITT";
  1668. szValue = "";
  1669. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1670.  
  1671. szName = "Modulation_Bell";
  1672. szValue = "";
  1673. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1674.  
  1675. szName = "SpeedNegotiation_Off";
  1676. szValue = "";
  1677. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1678.  
  1679. szName = "SpeedNegotiation_On";
  1680. szValue = "";
  1681. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1682.  
  1683. szName = "Pulse";
  1684. szValue = "P";
  1685. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1686.  
  1687. szName = "Tone";
  1688. szValue = "T";
  1689. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1690.  
  1691. szName = "Blind_Off";
  1692. szValue = "";
  1693. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1694.  
  1695. szName = "Blind_On";
  1696. szValue = "";
  1697. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1698.  
  1699. szName = "CallSetupFailTimer";
  1700. szValue = "S7=<#>";
  1701. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1702.  
  1703. szName = "InactivityTimeout";
  1704. szValue = "S19=<#>";
  1705. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1706.  
  1707. szKey = "System\\CurrentControlSet\\Services\\Class\\Modem\\" + szModemNumber3 + "\\Fax";
  1708. szName = "Class1DTESpeed";
  1709. szValue = "AUTO";
  1710. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1711.  
  1712. szName = "Class1FlowOff";
  1713. szValue = "";
  1714. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1715.  
  1716. szName = "Class1FlowHW";
  1717. szValue = "";
  1718. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1719.  
  1720. szName = "Class1FlowSW";
  1721. szValue = "";
  1722. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1723.  
  1724. szName = "Class2FlowOff";
  1725. szValue = "";
  1726. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1727.  
  1728. szName = "Class2FlowHW";
  1729. szValue = "";
  1730. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1731.  
  1732. szName = "Class2FlowSW";
  1733. szValue = "";
  1734. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741. SetStatusWindow(90, "Installieren von cFos...");
  1742.  
  1743. szKey = "Enum\\Root\\Modem\\" + szModemNumber0 + "";
  1744. szName = "Class";
  1745. szValue = "Modem";
  1746. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1747.  
  1748. szName = "Driver";
  1749. szValue = "Modem\\" + szModemNumber0;
  1750. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1751.  
  1752. szName = "Mfg";
  1753. szValue = "cFos Lueders Winkler GbR";
  1754. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1755.  
  1756. szName = "HardwareID";
  1757. szValue = "UNIMODEMF68C9B30";
  1758. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1759.  
  1760. szName = "DeviceDesc";
  1761. szValue = "cFos.Win,  ISDN driver (X.75, default settings)";
  1762. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1763.  
  1764. szName = "ConfigFlags";
  1765. szValue = "00,00,00,00";
  1766. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1767.  
  1768. szName = "FriendlyName";
  1769. szValue = "cFos.Win,  ISDN driver (X.75, default settings)";
  1770. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1771.  
  1772. szKey = "Enum\\Root\\Modem\\" + szModemNumber1 + "";
  1773. szName = "Class";
  1774. szValue = "Modem";
  1775. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1776.  
  1777. szName = "Driver";
  1778. szValue = "Modem\\" + szModemNumber1;
  1779. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1780.  
  1781. szName = "Mfg";
  1782. szValue = "cFos Lueders Winkler GbR";
  1783. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1784.  
  1785. szName = "HardwareID";
  1786. szValue = "CFOSWIN_2";
  1787. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1788.  
  1789. szName = "DeviceDesc";
  1790. szValue = "cFos.Win,  ISDN driver (X.75 Datex-J)";
  1791. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1792.  
  1793. szName = "ConfigFlags";
  1794. szValue = "00,00,00,00";
  1795. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1796.  
  1797. szName = "FriendlyName";
  1798. szValue = "cFos.Win,  ISDN driver (X.75 Datex-J)";
  1799. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1800.  
  1801. szKey = "Enum\\Root\\Modem\\" + szModemNumber2 + "";
  1802. szName = "Class";
  1803. szValue = "Modem";
  1804. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1805.  
  1806. szName = "Driver";
  1807. szValue = "Modem\\" + szModemNumber2;
  1808. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1809.  
  1810. szName = "Mfg";
  1811. szValue = "cFos Lueders Winkler GbR";
  1812. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1813.  
  1814. szName = "HardwareID";
  1815. szValue = "CFOSWIN_13";
  1816. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1817.  
  1818. szName = "DeviceDesc";
  1819. szValue = "cFos.Win,  ISDN driver (V.110, 38400)";
  1820. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1821.  
  1822. szName = "ConfigFlags";
  1823. szValue = "00,00,00,00";
  1824. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1825.  
  1826. szName = "FriendlyName";
  1827. szValue = "cFos.Win,  ISDN driver (V.110, 38400)";
  1828. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1829.  
  1830. szKey = "Enum\\Root\\Modem\\" + szModemNumber3 + "";
  1831. szName = "Class";
  1832. szValue = "Modem";
  1833. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1834.  
  1835. szName = "Driver";
  1836. szValue = "Modem\\" + szModemNumber3;
  1837. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1838.  
  1839. szName = "Mfg";
  1840. szValue = "cFos Lueders Winkler GbR";
  1841. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1842.  
  1843. szName = "HardwareID";
  1844. szValue = "CFOSWIN_15";
  1845. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1846.  
  1847. szName = "DeviceDesc";
  1848. szValue = "cFos.Win,  ISDN driver (V.120)";
  1849. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1850.  
  1851. szName = "ConfigFlags";
  1852. szValue = "00,00,00,00";
  1853. RegistryEntry(szKey, szName, szValue, REGDB_BINARY);
  1854.  
  1855. szName = "FriendlyName";
  1856. szValue = "cFos.Win,  ISDN driver (V.120)";
  1857. RegistryEntry(szKey, szName, szValue, REGDB_STRING);
  1858.  
  1859. SetStatusWindow(95, "Installieren von cFos...");
  1860.  
  1861. //////////////////////////////////////////////////////////////////////////////
  1862. // Make necessary changes to Win.ini System.ini
  1863. //////////////////////////////////////////////////////////////////////////////
  1864. ChangeSystemIni:
  1865.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "param", sgSelectedComPort + " -w4");
  1866.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "help", sgCfosPath + "\\cfos.hlp");
  1867.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "capi", sgCapiPath);
  1868.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "capi20", sgCapiPath);
  1869.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "key", sgCfosPath + "\\cfos.key");
  1870.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "profile", sgCfosPath + "\\profile");
  1871.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "factory", sgCfosPath + "\\factory");
  1872.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "cfosdw", sgCfosPath + "\\cfosdw.exe");
  1873.     if (nCapiVersion = 1) then
  1874.         sgTemp="";
  1875.     else
  1876.         sgTemp="20";
  1877.     endif;
  1878.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "drv", sgCfosPath + "\\cfos" + sgTemp + ".drv");
  1879.     GetProfString(WINDIR+"SYSTEM.INI", "boot", "comm.drv", sgTemp);
  1880.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "oldcomm", sgTemp);
  1881.     AddProfString(WINDIR+"SYSTEM.INI", "386Enh", "device", sgCfosPath + "\\vcfos.vxd");
  1882.     WriteProfString(WINDIR+"SYSTEM.INI", "cFos", "uninstall", sgUninstallLogFile);
  1883.  
  1884.     GetProfString(WINDIR+"WIN.INI", "windows", "run", sgTemp); // I added the removal of any possible cfosdw.exe in this line to SETUP.RUL
  1885.                                                                // so that I don't need to check in here, if cfosdw.exe already in this line.
  1886.     if (sgTemp = "") then
  1887.         sgRun = sgCfosPath + "\\cfosdw.exe";
  1888.     else 
  1889.         sgRun = sgTemp + " " + sgCfosPath + "\\cfosdw.exe";
  1890.     endif;
  1891.     WriteProfString(WINDIR+"WIN.INI", "windows", "run", sgRun);
  1892.  
  1893. //////////////////////////////////////////////////////////////////////////////
  1894. // End of program Block
  1895. //////////////////////////////////////////////////////////////////////////////
  1896. exit;
  1897.  
  1898. //////////////////////////////////////////////////////////////////////////////
  1899. //
  1900. // Function:  RegistryEntry
  1901. //
  1902. //  Purpose:  Adds a Registry Entry 
  1903. //
  1904. //    Input:  STRING szKey, STRING szValueName, STRING szValue, NUMBER nValueType
  1905. //
  1906. //  Returns:  TRUE, if successful, otherwise FALSE
  1907. //
  1908. //   Author: Kai Uwe Beecken, IPG Europe
  1909. //
  1910. //////////////////////////////////////////////////////////////////////////////
  1911.  
  1912.  
  1913. function RegistryEntry(szlKey, szlValueName, szlValue, nlValueType)
  1914.  
  1915. BOOL bReturnValue;
  1916. NUMBER nlSize;
  1917.  
  1918. begin
  1919.  
  1920.     nlSize=-1;
  1921.     if (RegDBKeyExist (szlKey) < 0) then
  1922.         if (RegDBCreateKeyEx (szKey, szClass) < 0) then
  1923.             MessageBox ("Eintrag in die Registry schlug fehl: " + szlKey, WARNING);
  1924.             bReturnValue = FALSE;
  1925.         endif;
  1926.     endif;
  1927.     if (RegDBKeyExist (szlKey) < 0) then
  1928.         MessageBox ("Eintrag in der Registry konnte nicht gefunden werden: " + szlKey, WARNING);
  1929.         bReturnValue= FALSE;
  1930.           else
  1931.         if (nlValueType=REGDB_BINARY) then
  1932.             nlSize=ConvertStringToHex(szlValue);
  1933.             if (nlSize=0) then
  1934.                 return FALSE;
  1935.             endif;
  1936.         else
  1937.             sgGlobalBinaryString = szlValue;
  1938.         endif;
  1939.         if (RegDBSetKeyValueEx (szlKey, szlValueName, nlValueType, sgGlobalBinaryString, nlSize) < 0) then
  1940.             MessageBox ("Eintrag in die Registry schlug fehl: " + szlKey + " " + szlValueName, WARNING);
  1941.             bReturnValue = FALSE;
  1942.            else
  1943.             bReturnValue = TRUE;
  1944. //            SprintfBox (INFORMATION, "Schau in den Regedit", "Schau nach, ob %s existiert!", szlKey);
  1945.            endif;
  1946.          endif;
  1947.     return bReturnValue;
  1948. end;
  1949.  
  1950.  
  1951. //////////////////////////////////////////////////////////////////////////////
  1952. //
  1953. // Function:  GetRegistryEntry
  1954. //
  1955. //  Purpose:  Retrieves a value from the Registry
  1956. //
  1957. //    Input:  STRING szKey, STRING szValueName, sgRegistryValue, NUMBER nValueType
  1958. //
  1959. //  Returns:  NUMBER size of the string.
  1960. //
  1961. //   Author: Kai Uwe Beecken, IPG Europe
  1962. //
  1963. //////////////////////////////////////////////////////////////////////////////
  1964.  
  1965.  
  1966. function GetRegistryEntry(szlKey, szlValueName,  sgRegistryValue, nlValueType)
  1967.  
  1968. NUMBER nlSize;
  1969.  
  1970. begin
  1971.  
  1972.         if (RegDBKeyExist (szlKey) < 0) then
  1973.             MessageBox ("Eintrag in der Registry konnte nicht gefunden werden: " + szlKey, WARNING);
  1974.             nlSize=0;
  1975.               else
  1976.             if (RegDBGetKeyValueEx (szlKey, szlValueName, nlValueType, sgRegistryValue, nlSize) < 0) then
  1977.                 MessageBox ("Konnte Key in der Registry nicht auslesen: " + szlKey + " " + szlValueName, WARNING);
  1978.                 nlSize=0;
  1979.             else
  1980. //                MessageBox ("Folgender Wert wurde ermittelt: " + sgRegistryValue, WARNING);
  1981.                endif;
  1982.              endif;
  1983.     return nlSize;
  1984. end;
  1985.  
  1986. //////////////////////////////////////////////////////////////////////////////
  1987. //
  1988. // Function:  ConvertStringToHex
  1989. //
  1990. //  Purpose:  Converts a string ("hex: a8,12,b4") to binary data.
  1991. //
  1992. //    Input:  STRING szString
  1993. //
  1994. //  Returns:  NUMBER number of bytes in the returned string.
  1995. //
  1996. //   Author: Kai Uwe Beecken, IPG Europe
  1997. //
  1998. //////////////////////////////////////////////////////////////////////////////
  1999.  
  2000.  
  2001. function ConvertStringToHex(szString);
  2002.  
  2003. STRING svlTempString, svlResultString;
  2004. BOOL blDone;
  2005. NUMBER nlLength, nlSize, nlPosition, nlTens, nlOnes, nlTemp;
  2006.  
  2007. begin
  2008.  
  2009.     sgGlobalBinaryString = "                                                                                                            ";
  2010.     nlLength = StrLength(szString);
  2011.     if (nlLength < 1) then
  2012.         return 0;
  2013.     endif;
  2014.     
  2015.     StrToLower(svlTempString, szString);
  2016.     StrSub(svlResultString, svlTempString, 0, 4);
  2017.     if (svlResultString = "hex:") then
  2018.         if (nlLength<4) then
  2019.             return 0;
  2020.         endif;
  2021.         nlLength=nlLength - 4;
  2022.         StrSub(svlResultString, svlTempString, 4, nlLength);
  2023.     else
  2024.         svlResultString=svlTempString;
  2025.     endif;
  2026.     
  2027.     if (nlLength < 2) then
  2028.         return 0;
  2029.     endif;
  2030.     
  2031.     nlSize=0;
  2032.     nlPosition = 0;
  2033.     blDone=FALSE;
  2034.     while (!blDone)
  2035.         GetByte(nlTens, svlResultString, nlPosition);
  2036. //        SprintfBox(INFORMATION,"GetByte","Getbyte for %s: Pos: %d Char: %c Value: %d", 
  2037. //            svlResultString, nlPosition, nlTens, nlTens); 
  2038.         if (nlTens > 47 && nlTens < 58) then
  2039.             nlTens = nlTens - 48;
  2040.         elseif (nlTens > 96 && nlTens < 103) then
  2041.             nlTens = nlTens - 97 + 10;
  2042.         else
  2043.             return 0;
  2044.         endif;
  2045.         nlPosition = nlPosition +1;
  2046.         if (nlPosition >= nlLength) then
  2047.             blDone = TRUE;
  2048.             return nlSize;
  2049.         endif;
  2050.         GetByte(nlOnes, svlResultString, nlPosition);
  2051. //        SprintfBox(INFORMATION,"GetByte","Getbyte for %s: Pos: %d Char: %c Value: %d", 
  2052. //            svlResultString, nlPosition, nlOnes, nlOnes); 
  2053.         if (nlOnes > 47 && nlOnes < 58) then
  2054.             nlOnes = nlOnes - 48;
  2055.         elseif (nlOnes > 96 && nlOnes < 103) then
  2056.             nlOnes = nlOnes - 97 + 10;
  2057.         else
  2058.             return 0;
  2059.         endif;
  2060.         
  2061.         nlTemp = (nlTens * 16) + nlOnes;
  2062. //        SprintfBox(INFORMATION,"Calculation","The value calculated for this byte is: %d", nlTemp); 
  2063.         SetByte(sgGlobalBinaryString, nlSize, nlTemp);
  2064. //        SprintfBox(INFORMATION,"SetByte","Setbyte was called with these parameters: Pos: %d Value: %d String so far: %s", nlSize, nlTemp, sgGlobalBinaryString); 
  2065.         nlSize = nlSize + 1;
  2066.         nlTens = 0;
  2067.         nlOnes = 0;
  2068.  
  2069.         nlPosition = nlPosition +2;
  2070.         if (nlPosition >= nlLength) then
  2071.             blDone = TRUE;
  2072.         endif;
  2073.         
  2074. //        if (blDone) then
  2075. //            SprintfBox(INFORMATION,"Status","String was converted successfully. Length: %d", nlSize); 
  2076. //        endif;
  2077.     endwhile;    
  2078.     return nlSize;
  2079. end;
  2080.